// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_INV_LOCATION_EX_HIS
// * CreateDate    : 2014-06-05 18:30:09
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:09
// * LastChanger   : 2014-06-05 18:30:09
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class InvLocationExHisEntity : EntityBase
    {
        public InvLocationExHisTable TableSchema
        {
            get
            {
                return InvLocationExHisTable.Current;
            }
		}
		
		public InvLocationExHisEntity()
        {

        }
		
		public InvLocationExHisEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.LocationExId = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_EX_ID"]));
			this.InvIoId = Convert.ToString(CommonFunctions.ToObject(dr["INV_IO_ID"]));
			this.LocationId = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_ID"]));
			this.MaterialId = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_ID"]));
			this.HisExType = Convert.ToInt32(CommonFunctions.ToObject(dr["HIS_EX_TYPE"]));
			this.HisMaterialId = Convert.ToString(CommonFunctions.ToObject(dr["HIS_MATERIAL_ID"]));
			this.HisRelatedId = Convert.ToString(CommonFunctions.ToObject(dr["HIS_RELATED_ID"]));
			this.HisLotNo = Convert.ToString(CommonFunctions.ToObject(dr["HIS_LOT_NO"]));
			this.Type = Convert.ToInt32(CommonFunctions.ToObject(dr["TYPE"]));
        }
		
		public InvLocationExHisEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.LocationExId = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_EX_ID"]));
			this.InvIoId = Convert.ToString(CommonFunctions.ToObject(dr["INV_IO_ID"]));
			this.LocationId = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_ID"]));
			this.MaterialId = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_ID"]));
			this.HisExType = Convert.ToInt32(CommonFunctions.ToObject(dr["HIS_EX_TYPE"]));
			this.HisMaterialId = Convert.ToString(CommonFunctions.ToObject(dr["HIS_MATERIAL_ID"]));
			this.HisRelatedId = Convert.ToString(CommonFunctions.ToObject(dr["HIS_RELATED_ID"]));
			this.HisLotNo = Convert.ToString(CommonFunctions.ToObject(dr["HIS_LOT_NO"]));
			this.Type = Convert.ToInt32(CommonFunctions.ToObject(dr["TYPE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return InvLocationExHisTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(InvLocationExHisTable.C_ID)); }
            set { SetData(InvLocationExHisTable.C_ID, value); }
        }
		
        [DataMember]
        public string LocationExId
        {
            get { return Convert.ToString(GetData(InvLocationExHisTable.C_LOCATION_EX_ID)); }
            set { SetData(InvLocationExHisTable.C_LOCATION_EX_ID, value); }
        }
		
        [DataMember]
        public string InvIoId
        {
            get { return Convert.ToString(GetData(InvLocationExHisTable.C_INV_IO_ID)); }
            set { SetData(InvLocationExHisTable.C_INV_IO_ID, value); }
        }
		
        [DataMember]
        public string LocationId
        {
            get { return Convert.ToString(GetData(InvLocationExHisTable.C_LOCATION_ID)); }
            set { SetData(InvLocationExHisTable.C_LOCATION_ID, value); }
        }
		
        [DataMember]
        public string MaterialId
        {
            get { return Convert.ToString(GetData(InvLocationExHisTable.C_MATERIAL_ID)); }
            set { SetData(InvLocationExHisTable.C_MATERIAL_ID, value); }
        }
		
        [DataMember]
        public int HisExType
        {
            get { return Convert.ToInt32(GetData(InvLocationExHisTable.C_HIS_EX_TYPE)); }
            set { SetData(InvLocationExHisTable.C_HIS_EX_TYPE, value); }
        }
		
        [DataMember]
        public string HisMaterialId
        {
            get { return Convert.ToString(GetData(InvLocationExHisTable.C_HIS_MATERIAL_ID)); }
            set { SetData(InvLocationExHisTable.C_HIS_MATERIAL_ID, value); }
        }
		
        [DataMember]
        public string HisRelatedId
        {
            get { return Convert.ToString(GetData(InvLocationExHisTable.C_HIS_RELATED_ID)); }
            set { SetData(InvLocationExHisTable.C_HIS_RELATED_ID, value); }
        }
		
        [DataMember]
        public string HisLotNo
        {
            get { return Convert.ToString(GetData(InvLocationExHisTable.C_HIS_LOT_NO)); }
            set { SetData(InvLocationExHisTable.C_HIS_LOT_NO, value); }
        }
		
        [DataMember]
        public int Type
        {
            get { return Convert.ToInt32(GetData(InvLocationExHisTable.C_TYPE)); }
            set { SetData(InvLocationExHisTable.C_TYPE, value); }
        }
		
		#endregion
	}
	
	
}	

